;
(function () {
	var weatherUtil = {};
	weatherUtil.getVal = function (changeValue) {
		var getValue = "0%";
		if ((changeValue.indexOf("暴雪") != -1) || (changeValue.indexOf("暴雨") != -1) || (changeValue.indexOf("heavy snow") != -1) || (changeValue.indexOf("torrential rain") != -1)) {
			getValue = "80%";
		} else if ((changeValue.indexOf("大雨") != -1) || (changeValue.indexOf("大雪") != -1) || (changeValue.indexOf("中雪") != -1) || (changeValue.indexOf("中雨") != -1) || (changeValue.indexOf("heavy rain") != -1) || (changeValue.indexOf("heavy snow") != -1)) {
			getValue = "70%";
		} else if ((changeValue.indexOf("雨") != -1) || (changeValue.indexOf("雪") != -1) || (changeValue.indexOf("冰雹") != -1) || (changeValue.indexOf("雷电") != -1) || (changeValue.indexOf("rain") != -1) || (changeValue.indexOf("snow") != -1) || (changeValue.indexOf("hail") != -1) || (changeValue.indexOf("drizzle") != -1) || (changeValue.indexOf("shower") != -1)) {
			getValue = "60%";
		} else if ((changeValue.indexOf("阴间多云") != -1) || (changeValue.indexOf("overcast") != -1)) {
			getValue = "40%";
		} else if (changeValue.indexOf("多云间阴") != -1) {
			getValue = "30%";
		} else if ((changeValue.indexOf("多云间晴") != -1) || (changeValue.indexOf("cloudy") != -1)) {
			getValue = "20%";
		} else if ((changeValue.indexOf("晴间多云") != -1) || (changeValue.indexOf("cloudless") != -1)) {
			getValue = "10%";
		} else if (changeValue.indexOf("阴") != -1) {
			getValue = "40%";
		} else if (changeValue.indexOf("多云") != -1) {
			getValue = "20%";
		} else if ((changeValue.indexOf("龙卷") != -1) || (changeValue.indexOf("沙尘暴") != -1) || (changeValue.indexOf("扬沙") != -1) || (changeValue.indexOf("浮尘") != -1) || (changeValue.indexOf("霾") != -1) || (changeValue.indexOf("雾") != -1)) {
			getValue = "10%";
		} else if ((changeValue.indexOf("晴") != -1) || (changeValue.indexOf("fine") != -1)) {
			getValue = "5%";
		}
		return getValue;
	};
	weatherUtil.getText = function (changeText) {
		var textArr = [];
		//if ((changeText.indexOf("局部") != -1) || (changeText.indexOf("伴随") != -1) || (changeText.indexOf("有") != -1)) {
			var weatherList = ['冰雹', '短时强降水', '雷雨大风', '雷暴', '雷电', '轻雾', '大雾', '浓雾', '强浓雾', '特强浓雾', '轻度霾', '中度霾', '重度霾', '严重霾', '扬沙或浮尘', '沙尘暴', '强沙尘暴'];
			for (var i = 0; i < weatherList.length; i++) {
				if ((changeText.indexOf(weatherList[i]) != -1)) {
					textArr.push(weatherList[i]);
				}
			}
			if (textArr.length == 0) {
				if (changeText.indexOf("雾") != -1) {
					textArr.push("雾");
				}
				if (changeText.indexOf("霾") != -1) {
					textArr.push("霾");
				}
				if (changeText.indexOf("沙尘") != -1) {
					textArr.push("沙尘");
				}
			}
		//}
		if (textArr.length == 0) {
			textArr.push("无");
		}
		return textArr.join('、');
	};
	window.weatherUtil = weatherUtil;
})()